package com.ruoyi.produce.process.costApportionment.service;

import com.ruoyi.produce.process.costApportionment.domain.CostApportionmentCond;
import com.ruoyi.produce.process.costApportionment.domain.CostApportionmentDomain;
import com.ruoyi.produce.process.costApportionment.domain.CostApportionmentDto;
import com.ruoyi.produce.process.costApportionment.domain.CostApportionmentListDto;

import java.util.List;

/**
 * 在产成本费用分摊
 * 业务层
 */
public interface ICostApportionmentService {
    /**
     * 在产成本费用分摊查询
     * @param cond
     * @return
     */
    List<CostApportionmentDto> selectCostApportionmentList(CostApportionmentCond cond);

    /**
     * 按编号查询
     * @param costApportionmentId 在产成本费用分摊编号
     * @return
     */
    CostApportionmentDto selectCostApportionmentById(String costApportionmentId);

    /**
     * 在产成本费用分摊新增
     * @param costApportionment
     * @return
     */
    int insertCostApportionment(CostApportionmentDomain costApportionment);

    /**
     * 在产成本费用分摊更新
     * @param costApportionment
     * @return
     */
    int updateCostApportionment(CostApportionmentDomain costApportionment) throws Exception;

    /**
     * 更新在产成本费用分摊删除标志位
     * @param costApportionment
     * @return
     */
    int updateCostApportionmentDeleteFlag(CostApportionmentDomain costApportionment);

    /**
     * 在产成本费用分摊详细查询
     * @param cond
     * @return
     */
    List<CostApportionmentListDto> selectCostApportionmentListList(CostApportionmentCond cond);

    /**
     * 查询在产成本费用分摊对应的所有计划详细
     * @param costApportionmentId 在产成本费用分摊编号
     * @return
     */
    List<CostApportionmentListDto> selectCostApportionmentListListById(String costApportionmentId);

    /**
     * 查询在产成本费用分摊对应的指定产品详细
     * @param costApportionment
     * @return
     */
    CostApportionmentListDto  selectCostApportionmentListById(String costApportionment, String planSelfId);

    /**
     * 根据生产计划编号查询是否有费用分摊记录
     * @param planSelfId
     * @return
     */
    boolean selectCostApportionmentByPlanSelfId(String planSelfId);
}
